package com.huaju.enity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Bankcard entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "bankcard", catalog = "licai")
public class Bankcard implements java.io.Serializable {

	// Fields

	private Integer bid;
	private Integer comId;
	private Account account;
	private String bname;
	private String cardNo;

	// Constructors

	/** default constructor */
	public Bankcard() {
	}

	/** full constructor */
	public Bankcard(Account account, String bname, String cardNo) {
		this.account = account;
		this.bname = bname;
		this.cardNo = cardNo;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "bid", unique = true, nullable = false)
	public Integer getBid() {
		return this.bid;
	}

	public void setBid(Integer bid) {
		this.bid = bid;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "aid")
	public Account getAccount() {
		return this.account;
	}

	public void setAccount(Account account) {
		this.account = account;
	}

	@Column(name = "bname")
	public String getBname() {
		return this.bname;
	}

	public void setBname(String bname) {
		this.bname = bname;
	}

	@Column(name = "cardNo")
	public String getCardNo() {
		return this.cardNo;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}

	public Integer getComId() {
		return comId;
	}

	public void setComId(Integer comId) {
		this.comId = comId;
	}

}